<%- range = @messages.values_at(0,-1).compact.map(&:id).uniq * '-' -%>
<%- @subtitles = " - Permalink #" + range -%>
<%= render :partial => "message", :collection => @messages %>
